﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace FinancePortal.Domain.Model
{
    public class Activity : Entity
    {
        public Activity()
        {
            ChildActivities = new List<Activity>();
        }

        //[Required(ErrorMessage = "A name is required")]
        //[StringLength(50)]
        public virtual string Name { get; set; }

        //[Required(ErrorMessage = "A description is required")]
        //[StringLength(500)]
        public virtual string Description { get; set; }

        public virtual Area Area { get; set; }

        //[Required(ErrorMessage = "A area is required")]
        public virtual int AreaId { get; set; }

        public virtual Activity ParentActivity { get; set; }

        public virtual int? ParentActivityId { get; set; }

        public virtual IList<Activity> ChildActivities { get; set; }
    }
}
